VoiceGuide IVR Software Main Page
Jump to content

VG ends in 3CX every 2 Minutes

Recommended Posts

Hello.

VG ends the connection every 2 Minutes with the Connection to the 3CX Cloud PBX. Wireshark shows no errors. But I can see it in the Cloud PBX. The member turns from green to grey. Just a reconnect to 3CX solves this problem. What is the problem?

Greetings, Stefan

0719_ktTel.txt

wireshark.pcapng

Share this post


Link to post

With 3CX we recommend just setting up an IP based SIP trunk from 3CX to the VoiceGuide system. 

Just a Generic SIP Trunk with only 'IP Based' authentication and point to public IP address of the VoiceGuide system, and on the server running VoiceGuide makes to whitelist 3CX's public (WAN) IP addresses....

Share this post


Link to post

The reason why HMP/VoiceGuide was not renewing SIP registration on your connection - where you were registering HMP/VoiceGuide to be the handler of calls for a particular 3CX extension (like a IP softphone) - was because the 'Contact' header returned by 3CX was different then the LocalAlias set in VoiceGuide.

Please see this comment in our Help file page that covers SIP Registration: https://www.voiceguide.com/vghelp/source/html/config_voip_register.htm :

NOTE: Some SIP Registrars ignore the Contact: field provided and set their own instead.

In those cases the LocalAlias setting must match the Contact: field in the SIP Registrar's reply.
The Contact: fields in SIP REGISTER requests and the replies must match in order for the SIP Registration to work.
WireShark should be used to confirm contents of the SIP Registraton messages exchanged. 

 

The  LocalAliasas set in VoiceGudie's Config.xml to: 

950@192.168.2.201

but 3CX was returning the 'Contact' as:

sip:950@192.168.2.201:5060

which resulted in HMP not refreshing the registration, as there was a LocalAlias - Contact mismatch...

 

Setting LocalAlias in Config.xml to:

sip:950@192.168.2.201:5060

and restarting both the  Dialogic HMP and the VoiceGuide services should result in your current version of HMP resending SIP REGISTERs and keeping itself registered as an active extension on the 3CX.

screenshot of provided WireShark trace showing the Contact value returned by 3CX:

image.thumb.png.7958579cca9dfa95d6a1906800fc0fd4.png

 

Share this post


Link to post

SECURITY_NOTE: Please change the password used on the SIP account after posting any WireShark traces that capture SIP registrations or call authentications. Otherwise, if password is too simple, it can be cracked from the posted WireShark trace. If other parties crack your password then they may be able to start making calls through your account, which can result in large call charges on your SIP account.

Share this post


Link to post

From the updated https://www.voiceguide.com/vghelp/source/html/config_voip_register.htm :

 

Section <VoIP_Registration>:

<VoIP_Registration>
<Protocol>SIP</Protocol>
<RegServer>ServerAddress</RegServer>
<RegClient>RegisteredClient</RegClient>
<LocalAlias>LocalAlias</LocalAlias>
<Expires>Seconds</Expires>
</VoIP_Registration>
<Protocol> Set to SIP
<RegServer> IP address of the registration server or the domain name of the registration server.
If domain name is specified then HMP will resolve the domain name to IP address before issuing the registration request.
If domain name is used you must ensure that the DNS is configured to allow domain name to be resolved.
<RegClient> RegClient is usually specified in one of the below formats:
AuthUsername
AuthUsername@DomainName
AuthUsername@IPAddress

RegClient is used in the From: and the To: fields of SIP Register request.
<LocalAlias> Local Alias is usually specified in one of the below formats
number@local_ip_address
number@local_ip_address:local_port
number@local_host_name
number@local_host_name:local_port
user@local_ip_address
user@local_ip_address:local_port
user@local_host_name
user@local_host_name:local_port

A prefix "sip:" may be also used in front of the  above formats.

The local_ip_address should be the public IP address as visible by the SIP Registrar.

The local_port is 5060 unless VoiceGuide/HMP has been configured to use a different port.

Value of LocalAlias is used in the Contact: field of the SIP REGISTER request sent to Registrar/PBX.

NOTE 1: Some SIP Registrars ignore the Contact: field provided here and set their own instead.
In those cases the LocalAlias setting must match the Contact: field in the SIP Registrar's reply.
The Contact: fields in SIP REGISTER requests and the replies must match in order for the SIP Registration to work.
WireShark should be used to confirm contents of the SIP Registration messages exchanged.

NOTE 2: If this is not set correctly then you may not get ACK returned by SIP Registrar/PBX in the INVITE-OK-ACK exchange at start of calls, and the calls will not proceed.

<Expires> Sets how the 'Expires' value on the SIP Register request.
If this field is not set the default value of 60 seconds is used.

 

<VoIP_Authentication> holds information about the SIP digest authentication. It contains:

<VoIP_Authentication>
<Realm>Domain</Realm>
<Identity>AccountName</Identity>
<AuthUsername>AuthUser</AuthUsername>
<AuthPassword>AuthPassword</AuthPassword>
</VoIP_Authentication>

 

<Realm> The "realm" for which this authentication applies.
Needs to be set if AuthUsername is different to the RegClient in the <VoIP_Registration> section.
The "realm" is included by SIP Server/PBX in its "401-Unauthorized" / "407-Authentication Required" reponses in the 'Authenticate: Digest' field.
<Identity> The "client/contact" for which this authentication applies.
Needs to be set if AuthUsername is different to the RegClient in the <VoIP_Registration> section.
If specified then this authentication entry will only be used if Identity matches exactly the To: field contents in the "401-Unauthorized" / "407-Authentication Required" response from the registration server. The match must be exact. eg: if the To: field has a sip: prefix then that prefix must be included in this entry, otherwise HMP will not use this authentication entry for that 401/407 challenge.
<AuthUsername> Username used for authentication.
<AuthPassword> Password used for authentication.

 

The Dialogic HMP service must also be restarted after any changes to <VoIP_Registration> or <VoIP_Authentication> entries.
Dialogic HMP service restart is necessary to clear the old Registration/Authentication entries that have been previously loaded into HMP.
If Dialogic HMP service is not restarted then the previously loaded Registration and Authentication entries will take precedence.

WireShark can be used to confirm what SIP packets are exchanged between the SIP server and the VoiceGuide/HMP system. WireShark traces are usually necessary in determining causes of any registration failures.

 

3CX

Some versions of 3CX and some PBXs use a different Username then the Number (Client) that is being registered.
In such cases the Config.xml's Realm and Identity needs to be set to match to what the PBX uses in its Realm and Contact fields, so HMP knows for which Number/Client the authentication information is for.
eg: The below config works with 3CX System 20 release:

<VoIP_Registrations>

<VoIP_Registration>
<Display>3CX_1000</Display>
<Protocol>SIP</Protocol>
<RegServer>10.1.40.189</RegServer>
<RegClient>1001@myname.3cx.us</RegClient>
<LocalAlias>sip:1001@myname.3cx.us:5060</LocalAlias>
<Expires></Expires>
</VoIP_Registration>

</VoIP_Registrations>

<VoIP_Authentications>

<VoIP_Authentication>
<Display></Display>
<Realm>3CXPhoneSystem</Realm>
<Identity>sip:1001@myname.3cx.us</Identity>
<AuthUsername>XxXxXxXxXx</AuthUsername>
<AuthPassword>YyYyYyYyYy</AuthPassword>
</VoIP_Authentication>

</VoIP_Authentications>

 

Please also refer to the below posts for information on setting up a SIP Trunk on 3CX pointing to VoiceGuide:

https://www.voiceguide.com/forums/topic/14762-register-vg-sip/?do=findComment&comment=47229

and here:

https://www.voiceguide.com/forums/topic/14762-register-vg-sip/?do=findComment&comment=47225

Setting up a SIP trunk if usually a better solution for an IVR system intended to handle many simultaneous calls. 

Share this post


Link to post

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×